<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <script type="text/javascript" src="../../scripts/jquery/jquery-1.7.1.js"></script>
    <link href="../../style/authority/basic_layout.css" rel="stylesheet" type="text/css">
    <link href="../../style/authority/common_style.css" rel="stylesheet" type="text/css">
    <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
    <script type="text/javascript" src="../../scripts/authority/commonAll.js"></script>
    <script type="text/javascript" src="../../scripts/fancybox/jquery.fancybox-1.3.4.js"></script>
    <script type="text/javascript" src="../../scripts/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
    <link rel="stylesheet" type="text/css" href="../../style/authority/jquery.fancybox-1.3.4.css" media="screen"></link>
    <script type="text/javascript" src="../../scripts/artDialog/artDialog.js?skin=default"></script>
    <title>个人信息管理系统</title>
    <script type="text/javascript">
        function GetQueryString(name) {
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
            var r = window.location.search.substr(1).match(reg);//search,查询？后面的参数，并匹配正则
            if (r != null) return unescape(r[2]);
            return null;
        }
        var myname = GetQueryString("name");

        function MyInformation() {
            $.ajax({
                url: "/FindAndUpdate/FindUserByName", //处理页面的路径
                data: {name: myname},//要提交的数据是一个JSON
                type: "POST", //提交方式
                //TEXT字符串 JSON返回JSON XML返回XML
                success: function (data) { //回调函数 ,成功时返回的数据存在形参data里
                    var item;
                    var items = '';
                    items += "<tr><th>" + "用户ID" + "</th><th >" + "用户名" + "</th><th >" + "密码" + "</th><th >" + "用户等级" + "</th></tr>";
                    var usertype = "普通用户";
                    if (data['level'] == 10) usertype = "管理员";
                    else usertype = "普通用户";
                 //  else if (data['level'] == 2) usertype = "销售主管";
                 //  else if (data['level'] == 3) usertype = "研发/测试人员";
                    item = "<tr><td>" + data['uid'] + "</td><td>" + data['username'] + "</td><td>" + data['password'] + "</td><td>" + usertype + "</td></tr>";
                    items += item;
                    $('#usertable').html(items);

                }
            });
        }
    </script>
    <style>
        .alt td {
            background: black !important;
        }
    </style>
</head>
<body onload="getDate01()">
<div id="container">
    <div class="ui_content">
        <div class="ui_text_indent">
            <div id="box_border">
                <div id="box_top">个人信息</div>

                <div id="box_bottom">
                    <table id="usertable" class="table" cellspacing="0" cellpadding="0" width="100%" align="center"
                           border="0"></table>
                    <script>
                        MyInformation();
                    </script>
                </div>
            </div>

        </div>
    </div>
    <div class="ui_tb">
    </div>
    <div class="ui_content">
        <div class="ui_tb_h30">
            <div class="ui_flt" style="height: 30px; line-height: 30px;">

            </div>
            <div class="ui_frt">

            </div>
        </div>
    </div>
</div>
</body>
</html>
